#include <goocanvas.h>

#ifndef ANIMATE_H_
#define ANIMATE_H_
#endif

typedef struct _Animate{
	gdouble start_x;
	gdouble start_y;
	gdouble stop_x;
	gdouble stop_y;
	
	gdouble init_scale;
	gdouble init_rotation;
	gdouble animate_scale;
	gdouble animate_rotation;
	gboolean isAbsolute;
	gint total_time;
	gint step_time;
	GooCanvasAnimateType type;
	
	//button's Object
	GooCanvasItem *parent;
	GooCanvasItem *cavas;
	GdkPixbuf *animate_pix;
	struct _Animate *next;
	
	//animate's function
	//void (*animation_finished_func)(GooCanvasItem *item, gboolean stopped, gpointer user_data);
	//gboolean (*stop_timeout_func)(void);
}Animate;

Animate *animate_new (GooCanvasItem * parent, char *image_path, 
		                                      gdouble start_x, gdouble start_y,
		                                      gdouble stop_x, gdouble stop_y,
		                                      gdouble init_scale, gdouble init_rotation,
		                                      gdouble animate_scale, gdouble animate_rotation,
		                                      gboolean isAbsolute, gint total_time, gint step_time, GooCanvasAnimateType type);

void animate_destroy (Animate *animate);
void animate_stop (Animate *animate);
void animate_restart (Animate *animate);
void animate_continue (Animate *animate);


